#ifndef __ZUIHORIZONTALLAYOUT_H__
#define __ZUIHORIZONTALLAYOUT_H__

#include "ZContainer.h"

namespace ZuiLib
{



class ZHorizontalLayout:public ZContainer
{
public:
	ZUI_CLASS_NAME("zui.HorizontalLayout");
	ZHorizontalLayout(void);
	~ZHorizontalLayout(void);

	const char* GetClass() const ZOVERRIDE;
	void* GetInterface(const char* pstrName) ZOVERRIDE;
	uint32_t GetControlFlags() const ZOVERRIDE;

	void SetSepWidth(int iWidth);
	int GetSepWidth() const;
	void SetSepImmMode(bool bImmediately);
	bool IsSepImmMode() const;

	void SetAttribute(const char* pstrName, const char* pstrValue) ZOVERRIDE;
	void DoEvent(TEventUI& event) ZOVERRIDE;

	void SetPos(RECT rc) ZOVERRIDE;
	void DoPostPaint(ZRenderer* render, const RECT& rcPaint) ZOVERRIDE;

	RECT GetThumbRect(bool bUseNew = false) const;

	SIZE EstimateSize(SIZE szAvailable) ZOVERRIDE;
protected:
	int m_iSepWidth;
	uint32_t m_uButtonState;
	POINT ptLastMouse;
	RECT m_rcNewPos;
	bool m_bImmMode;
};

}//namespace


#endif